package org.example;

// Press Shift twice to open the Search Everywhere dialog and type `show whitespaces`,
// then press Enter. You can now see whitespace characters in your code.


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        System.out.println("请输入信息（空格分开）");
        Scanner in=new Scanner(System.in);
        String msg=in.nextLine();
        String[] info=msg.split(" ");
        StringBuilder sb = new StringBuilder();
        for (int i=0;i<info.length-1;i++) {
            sb.append(info[i]);
            sb.append("-");
        }
        sb.append(info[info.length-1]);
        System.out.println(sb);
    }
}
